﻿using System.Linq;
using System.Text.Json.Serialization;
using BaseAPI.BaseViewModel;
using WebTest.Models;

namespace WebTest.ViewModels.ProjectViewModel;

public class ProjectGetOneByNameAndTransRequest : BaseGetOneViewModel<Project,ProjectGetListResponse>
{
    [JsonIgnore]
    public override long ID { get; set; }
    public string Name { get; set; }
    public ProjectGetOneByNameAndTransRequest()
    {
        DoNotUseID = true;
    }

    public override IQueryable<Project> QueryFun(IQueryable<Project> queryable)
    {
        return queryable.Where(x => x.Name == Name);
    }
}